package com.workplan.client.widgets.leftpanel;

import net.customware.gwt.presenter.client.widget.WidgetDisplay;

import com.general.client.basewidget.BaseWidget;
import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Widget;

public class LeftPanel extends BaseWidget implements LeftPanelPresenter.Display {

	@UiField(provided = true)
	Widget userInfo;

	@UiField(provided = true)
	Widget assembleStaff;
	@UiField(provided = true)
	Widget defineWorkweek;
	@UiField(provided = true)
	Widget planShifts;

	@UiField(provided = true)
	Widget keepInTouch;

	private boolean init = false;

	private static LeftPanelUiBinder uiBinder = GWT
			.create(LeftPanelUiBinder.class);

	interface LeftPanelUiBinder extends UiBinder<Widget, LeftPanel> {
	}

	public LeftPanel() {

	}

	@Override
	public void init() {
		if (!init) {
			initWidget(uiBinder.createAndBindUi(this));
			init = true;
		}
	}

	@Override
	public void setUserInfo(WidgetDisplay userInfo) {
		this.userInfo = userInfo.asWidget();
	}

	@Override
	public void setAssembleStaff(WidgetDisplay assembleStaff) {
		this.assembleStaff = assembleStaff.asWidget();
	}

	@Override
	public void setDefineWorkweek(WidgetDisplay defineWorkweek) {
		this.defineWorkweek = defineWorkweek.asWidget();
	}

	@Override
	public void setPlanShifts(WidgetDisplay planShifts) {
		this.planShifts = planShifts.asWidget();
	}

	@Override
	public void setKeepInTouch(WidgetDisplay keepInTouch) {
		this.keepInTouch = keepInTouch.asWidget();
	}

}
